function [ tree ] = generateTree( matrix, heads )
%UNTITLED3 Summary of this function goes here
%   Detailed explanation goes here
    dists = squareform(pdist(matrix));
    tree = seqneighjoin(dists, 'equivar', heads);

end

